package com.chixing.day03.day03_Test;

public class Account {
     private int accNo;   //账户账号
     private String accName;  //账户姓名
     private String accPassword;  //账户密码
     private long accTelno;  //账户手机号
     private float accBalance; //账户余额
     private int accType; //账户类型 0:储蓄账户, 1：信用账户

     //构造函数与方法
     //无参函数
     public Account() {

     }

     //有参函数
     public Account(int accNo, String accName, String accPassword, int accType, long accTelno, float accBalance) {
          this.accNo = accNo;
          this.accName = accName;
          this.accPassword = accPassword;
          this.accTelno = accTelno;
          this.accBalance = accBalance;
          this.accType = accType;

     }


     public int getAccNo() {
          return accNo;
     }

     public void setAccNo(int accNo) {
          this.accNo = accNo;
     }

     public String getAccName() {
          return accName;
     }

     public void setAccName(String accName) {
          this.accName = accName;
     }

     public String getAccPassword() {
          return accPassword;
     }

     public void setAccPassword(String accPassword) {
          this.accPassword = accPassword;
     }

     public long getAccTelno() {
          return accTelno;
     }

     public void setAccTelno(long accTelno) {
          this.accTelno = accTelno;
     }

     public float getAccBalance() {
          return accBalance;
     }

     public void setAccBalance(float accBalance) {
          this.accBalance = accBalance;
     }

     public int getAccType() {
          return accType;
     }

     public void setAccType(int accType) {
          this.accType = accType;
     }


     //账户存款
     public void depoist(float money) {
          accBalance += money;
          System.out.println("存款成功！余额为:" + accBalance);
     }

     //账户取款
     public void withdraw(float money) {
          accBalance -= money;
          System.out.println("取款成功！余额为:" + accBalance);
     }
}
